define(['jquery'], function($) {
	var Parabola = function(obj) {
		this.startEl = obj.startEl;
		this.endEl = obj.endEl;
		this.speed = obj.speed;
		this.callback = obj.callback;
		this.init();
	}
	Parabola.prototype = {
		constructor: Parabola,
		init: function() {
			this.startX = this.startEl.offset().top;
			this.startY = this.startEl.offset().left;
			this.endX = this.endEl.offset().top;
			this.endY = this.endEl.offset().left;
		},
		run: function() {
			var cloneDiv = this.startEl.clone();
			cloneDiv.html("");
			cloneDiv.css({
				"width":"20px",
				"height":"20px",
				'top':this.startX+'px',
				'left':this.startY+'px',
				'position':'absolute',
				//'background':"darkorange",
				'background':"#FF8C00",
				"border-radius":"50%"
			});
			$('body').after(cloneDiv);
			var that = this;
			cloneDiv.animate({
				top: this.endX + "px",
				left: this.endY + "px"
			}, "normal", function() {
				cloneDiv.remove();
				that.callback();
			})
		}
	}
	return Parabola;
});